home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 6 / Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso / 001a / msk311.zip / MSKERMIT.INI < prev    next >
Text File  |  1991-11-22  |  9KB  |  241 lines

  1. ; FILE MSKERMIT.INI
  2. ;
  3. ; Sample initialization file for MS-DOS Kermit 3.11.  Kermit executes the
  4. ; commands in this file automatically when it starts.  Kermit looks for
  5. ; MSKERMIT.INI first in the current disk and directory, and if it is not
  6. ; found there, then in the disks and directories listed in your DOS PATH
  7. ; variable (if any).  You can override Kermit's initialization file
  8. ; search by specifying a different filename on the command line, preceded
  9. ; by the -F switch, for example "kermit -f monday.ini" or "kermit -f nul".
  10. ;
  11. ; Author: Christine M. Gianone, February 1990.
  12. ; Revised for version 3.11 September 1991.
  13. ;
  14. ; If you have a valid MSKERMIT.PCH file for version 3.11 of MS-DOS Kermit,
  15. ; obtained from Columbia University, remove the following GOTO command to
  16. ; have the patches installed automatically when you start Kermit:
  17. ;
  18. GOTO MACROS
  19.  
  20. echo Patches...
  21. patch                       ; Install patches, if any, from MSKERMIT.PCH.
  22.  
  23. :MACROS
  24.  
  25. echo MS-DOS Kermit 3.11 initialization file...
  26.  
  27. COMMENT - Macro definitions section...
  28.  
  29. ; Reserved variables.  If you define new macros, don't use these names:
  30. ;  _editor   - DOS command that runs my preferred editor, for EDIT command.
  31. ;  _editfile - Last EDIT command filename.
  32. ;  _dialfile - Pathname of dialing directory file, for DIAL command.
  33. ;  _dialnum  - Last DIAL command phone number.
  34. ;  _modem    - Modem type for DIAL command.  Used to run the appropriate
  35. ;              dialing script, e.g. HAYES.SCR.  See DIAL definition.
  36. ;
  37. define _editor edlin            ; *** Change if necessary!
  38. define _dialfile C:\KERMIT\DIALUPS.TXT    ; *** Ditto
  39. define _modem hayes            ; *** Ditto
  40.  
  41. ; Macros for communicating with UNIX, VAX/VMS, and similar systems:
  42. def vax set par non, set flo x, set hand no, set dupl ful, set key \270 \127
  43. def vms do vax, set term byte 8  ; Assumes 8-bit no-parity connection.
  44. def unix do vax, set term byte 7 ; Most UNIX systems are still 7-bit.
  45.  
  46. ; Macro for communicating with IBM mainframes in linemode:
  47. def ibm set par mark, set flo no, set hand xon, set dup ha, set key \270 \8
  48.  
  49. ; Macro for communicating with IBM mainframes in fullscreen mode,
  50. ; through 3270 protocol converter like IBM 7171:
  51. def fullscreen set par ev,set flo x,set hand no,set dupl ful,set key \270 \8
  52.  
  53. ; Additional DOS commands available directly from the MS-Kermit> prompt.
  54.  
  55. ; DOS MORE command...
  56. def more if < argc 2 fatal {More what?},-
  57. run more < \%1
  58.  
  59. ; DOS REN(ame) command...
  60. def rename if < argc 2 fatal {Rename what?},-
  61.   if < argc 3 fatal {Rename \%1 to what?},-
  62.   run ren \%1 \%2
  63.  
  64. ; DOS COPY command...
  65. def copy if < argc 2 fatal {Copy what?},-
  66.   if < argc 3 fatal {Copy \%1 to what?},-
  67.   run copy \%1 \%2
  68.  
  69. ; DOS CHCP command to examine or change code page...
  70. def chcp run chcp \%1
  71.  
  72. ; EDIT command...
  73. def edit if = argc 2 assign _editfile \%1,-
  74.   if not def _editfile fatal {Edit what?},-
  75.   run \m(_editor) \m(_editfile)
  76.  
  77. ; CAPTURE command - Easy downloading of a file from the host, with no error
  78. ; checking.  Unlike the LOG SESSION command, CAPTURE always creates a new
  79. ; file.  It overwrites file of same name if it already exists.  Usage: at the
  80. ; MS-Kermit> prompt, type "capture xxx" where xxx is the name of the file you
  81. ; want to create on the PC.  Once you are connected to the host, TYPE the
  82. ; desired file.  Escape back when done.  The captured file will be on your
  83. ; disk (with a TYPE command at the beginning & a prompt at the end).
  84. ;
  85. def capture if = \v(argc) 1 fatal {Capture into what file?},-
  86.   if exist \%1 del \%1,-
  87.   log session \%1,-
  88.   connect,close session,log sess session.log,close sess
  89.  
  90. ; NORMAL, NOISY and CLEAN macros, modify to suit your environment...
  91. def normal set rec pac   94, set ret  5, set block 1, set window 1
  92. def noisy  set rec pac   40, set ret 20, set block 3, set window 8
  93. def clean  set rec pac 1000, set ret  4, set block 2, set window 2
  94.  
  95. ; Define a FATAL error macro.  Print message, go back to prompt.
  96. def fatal echo \%1, stop
  97.  
  98. ; ERRSTP macro, for use in scripts that want to hang up a dialed
  99. ; or network connection if there is any error.
  100. def errstp echo \%1,hangup,stop
  101.  
  102. ; LOOKUP macro for use with DIAL command.
  103. ; Requires MS-DOS Kermit 3.11 or later.
  104. ; Uses \m(_dialfile) for the dialing directory filename, defined above.
  105. ; Edit that file to contain the entries you will actually want to use.
  106. ;
  107. if < version 311 goto nolook
  108. def split assign \%x \%1,-
  109.   assign \%y \%2,-
  110.   assign \%s \%3,-
  111.   assign \%p \%4
  112.  
  113. def lookup if < \v(argc) 2 end 0,-
  114.   if not def _dialfile end 0,-
  115.   if not exist \m(_dialfile) end 0,-
  116.   open read \m(_dialfile),-
  117.   if failure fatal {Can't open dialing directory file \m(_dialfile)},-
  118.   assign \%5 \%x, assi \%6 \%y, assi \%7 \%s, assi \%8 \%p,-
  119.   echo Looking up "\%1",-
  120. :loop,-
  121.   read \%9,-
  122.   if fail goto eof,-
  123.   split \%9,-
  124.   if def \%x if not equal {\%x} {\%1} goto loop,-
  125.   echo From dialing directory: \%x = \%y,-
  126.   assign _dialnum \%y,-
  127.   if def \%s if not eq \%s = set speed \%s,-
  128.   if def \%p if not eq \%p = set parity \%p,-
  129.   goto done,-
  130. :eof,-
  131.   echo "\%1" not found in dialing directory \m(_dialfile),-
  132. :done,-
  133.   assign \%x \%5, assi \%y \%6, assi \%s \%7, assi \%p \%8,-
  134.   close read
  135.  
  136. ; LIST macro to list dialing directory.
  137. ; Assumes pathname of dialing directory is in \m(_dialfile).
  138. define list -
  139.   if not def _dialfile fatal {_DIALFILE not defined},-
  140.   if not exist \m(_dialfile) -
  141.     fatal {Can't find dialing directory file \m(_dialfile)},-
  142.   if < argc 2 run more < \m(_dialfile),-
  143.   if > argc 1 run find "\%1" \m(_dialfile) | more
  144.  
  145. ; DIAL and REDIAL commands...
  146. ; Requires the file \m(_modem).SCR to be on current disk or in DOS PATH,
  147. ; e.g., HAYES.SCR. Uses LOOKUP macro to access your dialing directory, if any.
  148. ; If argument omitted, uses previous phone number, if any.
  149. ; If multiple arguments are given, they are concatenated together
  150. ; with the separating spaces preserved, so you can "dial 800 7765 4321".
  151. def dial if < \v(argc) 2 if not def _dialnum fatal {Dial what?},-
  152.   if > \v(argc) 2 assign \%1 \%1 \%2 \%3 \%4 \%5 \%6 \%7 \%8 \%9,-
  153.   if > \v(argc) 1 assign _dialnum \%1,-
  154.   if not < \v(argc) 2 lookup {\m(_dialnum)},-
  155.   assign \%1 \m(_dialnum),-
  156.   take \m(_modem).scr,-
  157.   if fail end 1, end 0
  158.  
  159. define redial if not def _dialnum fatal {No number to redial}, dial
  160.  
  161. goto common            ; Skip over old-version warning
  162.  
  163. :NOLOOK
  164. version
  165. echo WARNING: This Kermit initialization file is for use with MS-DOS Kermit
  166. echo version 3.11 or later.  The LOOKUP macro will not be defined, and DIAL
  167. echo will not work.  Use an earlier version of MSKERMIT.INI or a later
  168. echo version of MS-DOS Kermit.
  169. define lookup echo The LOOKUP macro is not defined, stop
  170. define dial echo The DIAL macro is not defined, stop
  171.  
  172. :COMMON
  173.  
  174. COMMENT - File transfer settings
  175.  
  176. set file collision rename    ; Don't overwrite existing files
  177. set transfer character-set transparent ; For compatibility with old versions
  178. set receive packet-length 94    ; Regular-size packets
  179. set attributes on        ; Use file-attribute packets
  180. set window 1            ; Don't use sliding windows
  181.  
  182. COMMENT - Script defaults
  183.  
  184. set input timeout proceed    ; Allow IF SUCCESS/FAILURE to work
  185. set input echo on        ; Display port input on screen
  186. set input case ignore        ; Ignore alphabet case for input matching
  187.  
  188. ; The following setups are IBM-PC specific...
  189.  
  190. if not eq "\v(platform)" "IBM-PC" goto fin
  191.  
  192. COMMENT - Terminal emulation settings.  Modify to suit your environment.
  193.  
  194. set display 7            ; In the 7-bit environment (use 8 for VMS)
  195. set terminal vt320        ; Emulate DEC VT320
  196. set terminal roll off        ; Keep rolled-back screens where they are
  197. set terminal wrap on        ; Tell Kermit to do line wrap
  198. set terminal tabs at 1:8    ; Set tabs at every 8 spaces
  199. set terminal cursor underline    ; Underline cursor (rather than block)
  200. set terminal character latin1    ; Use ISO Latin-1 terminal character set
  201.  
  202. COMMENT - Sample TCP/IP configuration
  203. ;
  204. ; To use TCP/IP connections, replace the dummy values below with appropriate
  205. ; values for your network (consult your network manager) and uncomment the SET
  206. ; TCP/IP commands:
  207. ;
  208. ; SET TCP/IP ADDRESS ???.???.???.???  ; My PC's numeric IP address
  209. ; SET TCP/IP SUBNETMASK 255.255.255.0 ; My physical network's subnet mask
  210. ; SET TCP/IP DOMAIN FOO.BAR.EDU       ; My network's domain name
  211. ; SET TCP/IP GATEWAY ???.???.???.???  ; My network gateway's IP address
  212. ; SET TCP/IP PRIMARY-NAMESERVER ???.???.???.??? ; Primary nameserver's address
  213. ; SET TCP/IP SECONDARY-NAMESERVER ???.???.???.??? ; fallback nameserver address
  214. ; SET TCP/IP BROADCAST: 255.255.255.255 ; My network's broadcast address
  215.  
  216. COMMENT - Initial PC communication setup.
  217. ;
  218. ; The following commands are commented out, shown as examples only.
  219. ; Replace with settings appropriate for your PC and tastes.
  220. ;
  221. ; set port 1            ; Use COM1
  222. ; do vax            ; Set parameters for talking to VAX
  223. ;                 ; (These are the default parameters anyway)
  224. ;
  225. ; set key \96 \27        ; Exchange ESC and
  226. ; set key \27 \96        ; accent grave keys during terminal emulation
  227. ;
  228. ; set speed 9600                ; Transmission speed
  229. ; set terminal color 0 34 47    ; Terminal color is blue on white
  230.  
  231. COMMENT - Personalized initialization file
  232. ;
  233. ; To use a standard initialization file for everybody at your site, and still
  234. ; allow individual customizations, each user can have a file called (for
  235. ; example) MSCUSTOM.INI.  In this case, uncomment the following statement:
  236. ;
  237. ; take mscustom.ini
  238.  
  239. :FIN
  240. echo Smile!
  241.